#!/bin/sh
dir="/root/logout"
user="123456789"
passwd="123456"

#logout
logout(){

wget -qP $dir --post-data="action=logout&username=$user@yd&password=$passwd&ac_id=1&ajax=1" http://172.16.245.50/include/auth_action.php
res=`cat $dir/auth_action.php`
rm -f $dir/auth_action.php
if [ "$res" == "网络已断开" ]; then
	logger "edu logout:" "$res"
	echo $res 
	sleep 2
	/root/login.sh
else
	echo $res
	logger "edu logout" "$res"
fi
}

logout
